package com.atguigu.tingshu.user.client;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.model.user.UserPaidAlbum;
import com.atguigu.tingshu.model.user.UserPaidTrack;
import com.atguigu.tingshu.user.client.impl.UserInfoDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

import java.util.List;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-user", fallback = UserInfoDegradeFeignClient.class)
public interface UserInfoFeignClient {
    @GetMapping("/api/user/userInfo/findUserById/{userId}")
    Result<UserInfo> findUserById(@PathVariable Long userId);

    @GetMapping("/api/user/userInfo/findPayAlbum/{albumId}")
    Result<Boolean> findPayAlbum(@PathVariable Long albumId);


    @GetMapping("/api/user/userInfo/findPayTrack/{albumId}")
     Result<List<UserPaidTrack>> findPayTrack(@PathVariable Long albumId);

    @PutMapping("/api/user/userInfo/updateVipState")
     Result updateVipState();
}